﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using DAL;

namespace BUL
{
    public class ManageStaffBUL
    {
        ManageStaffDAL staffDAL = new ManageStaffDAL();

        public DataTable GetStaffBUL()
        {
            return staffDAL.GetStaffDAL();
        }

        public void AddStaffBUL(string username, string password, string name, int male, int roleId,
            string birthday, string phone, string address, string startedDate, int isShow)
        {
            staffDAL.AddStaffDAL(username,password,name,male,roleId,birthday,phone,address,startedDate,isShow);
        }

        public bool CheckExistedStaffDAL(string username)
        {
            return staffDAL.CheckExistedStaffDAL(username);
        }

        public void UpdateStaffBUS(string userId, string username, string password, string name, int male, int roleId,
            string birthday, string phone, string address, string startedDate, int isShow)
        {
            staffDAL.UpdateStaffDAL(userId, username, password, name, male, roleId, birthday, phone, address, startedDate, isShow);
        }

        //Delete
        public void DeactiveStaffBUS(string userId)
        {
            staffDAL.DeactiveStaffDAL(userId);
        }

        public DataSet GetRoleBUL()
        {
            return staffDAL.GetRoleDAL();
        }
    }
}
